import 'package:flutter/material.dart';

class ShopSearch extends StatelessWidget {
  final double boxWidth;
  final String hintTEXT;
  const ShopSearch({Key key, this.boxWidth, this.hintTEXT}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return Card(
      margin: EdgeInsets.only(left: 0, right: 0),
      shape: StadiumBorder(),
      child: SizedBox(
        width: 320,
        height: 35,
        child: Row(
          children: <Widget>[
            SizedBox(
              width: 5.0,
            ),
            Icon(
              Icons.search,
              color: Colors.grey,
              size: 20,
            ),
            GestureDetector(
                child: SizedBox(
                    height: 30,
                    width: boxWidth,
                    child: Align(
                      child: Container(
                        child: Text(hintTEXT),
                      ),
                      alignment: Alignment.centerLeft,
                    )),
                onTap: () => Navigator.pushNamed(context, '/search')),
          ],
        ),
      ),
    );
  }
}
